//
//  NewsTableViewCell.m
//  UI10_CellCelfSize自适应高度
//
//  Created by 402030900@qq.com on 16/7/27.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "NewsTableViewCell.h"
#import"UIView+Frame.h"
@interface NewsTableViewCell()
@property(nonatomic,strong)UILabel * newsLabel;
@end
@implementation NewsTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _newsLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        [self.contentView addSubview:_newsLabel];
        _newsLabel.numberOfLines = 0;
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    NSLog(@"%lf",self.contentView.lyr_height);
    NSLog(@"%lf",self.lyr_height);
    _newsLabel.frame = CGRectMake(0, 0, self.contentView.lyr_width, self.lyr_height);

}

-(void)setString:(NSString *)string{
    _string = [string copy];
    _newsLabel.text = _string;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
